package com.graduation.smartparkingplatform.Dao;

import com.graduation.smartparkingplatform.Pojo.Company;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CompanyMapper {
  // 查找公司ID
  public Integer getCompanyIdByName(@Param("companyName") Integer companyName);

  public List<Company> getCompanyList();

  public List<Company> searchCompany(
      @Param("companyName") String companyName, @Param("companyDirector") String companyDirector);

  public Boolean addCompany(
      @Param("companyName") String companyName,
      @Param("companyDirector") String companyDirector,
      @Param("telphone") String telphone,
      @Param("email") String email,
      @Param("nowTime") String nowTime);

  public Boolean changeInfo(
      @Param("companyId") Integer companyId,
      @Param("companyName") String companyName,
      @Param("companyDirector") String companyDirector,
      @Param("companyTel") String companyTel,
      @Param("email") String email,
      @Param("nowTime") String nowTime);

  public Boolean changeCompanyStatus(
      @Param("companyId") Integer companyId, @Param("status") Boolean status);

  public Boolean deleteCompany(@Param("CompanyId") Integer CompanyId);
}
